import VIX_Axios from "./index";

//URL两种前缀
let normalURL = "/chair/api";

// 获取短信验证码前的校验码
export const getSmsCCC = (params) => {
  return VIX_Axios(`${normalURL}/getSmsCCC`, {
    params,
  });
};

// 获取短信验证码
export const getSmsCode = (params) => {
  return VIX_Axios(`${normalURL}/smsCode`, {
    params,
  });
};

// 登录
export const register = (params) => {
  return VIX_Axios.post(`${normalURL}/cloud/user/register`, params);
};

// 获取抽奖规则信息 + 模板信息
export const getVipPowerConfigInfoApi = (params) => {
  return VIX_Axios(`${normalURL}/drawPrize/getVipPowerConfigInfoApi`, {
    params,
  });
};

// 抽奖
export const getDrawPrize_lottery = (params) => {
  return VIX_Axios.post(`${normalURL}/drawPrize/lottery`, params);
};

// 根据规则id获取最近多少分钟中奖信息
/*
id	转盘id
minutes	近多少分钟
*/
export const getDrawPrizeDataByid = (params) => {
  return VIX_Axios(`${normalURL}/drawPrize/getDrawPrizeDataByid`, {
    params,
  });
};

// 我的奖品
/*
 *page	第几页
 *pageSize	一页几条
 *phone	手机号
 */
export const getDrawPrizeMgData = (params) => {
  return VIX_Axios(`${normalURL}/drawPrize/getDrawPrizeMgData`, { params });
};

// 我的奖品
/*
 *page	第几页
 *pageSize	一页几条
 *phone	手机号
 */
 export const getMobiNum = (params) => {
  return VIX_Axios(`${normalURL}/duibaApi/getMembershipIntegral`, { params });
};

// export const net_getBillOrdersList =  () => {
//   const params = {
//     limit: "1000",
//     page: 1,
//     cid: 0,
//     status: -2,
//     rechargeSource: -1,
//   };

//   return  VIX_Axios(`/rechargeBill/getBillOrdersList`, {
//     params,
//   });
// };

// export const net_getBillOrdersList =  () => {
//   const params = {
//     limit: "1000",
//     page: 1,
//     cid: 0,
//     status: -2,
//     rechargeSource: -1,
//   };

//   return  VIX_Axios(`/rechargeBill/getBillOrdersList`, {
//     params,
//   });
// };

// export const net_refundBill =  (billId) => {
//   let data = {
//     refundPassword: "AaBb123@#",
//     billId,
//   };

//   return  VIX_Axios.post(`/rechargeBill/refundBill`, Qs.stringify(data), {
//     headers: {
//       "Content-type": "application/x-www-form-urlencoded;charset=utf-8",
//     },
//   })
// };
